<?php
	$this->title('Add Patient Prescription');
?>

<h3><?=$this->title();?></h3>

<?=$this->form->create($prescriptionRecord);?>
<?=$this->form->label('Patient');?>
<?php
	$patientCollection = array();
	foreach ($patients as $patient) {
		$patientCollection[$patient->id] = $patient->PatID;
	}
?>
<?=$this->form->select('patient_id', $patientCollection);?>
<?php
	foreach ($medications->data() as $medication) {
		$medicationCollection[$medication['id']] = $medication['Name'];
	}
?>
<?=$this->form->label('Attention Impairment');?>
<?=$this->form->select('medication_id', $medicationCollection);?>
<?=$this->form->field('start_date', array('label' => 'Start Date'));?>
<?=$this->form->field('end_date', array('label' => 'End Date'));?>
<?=$this->form->field('dosage');?>
<?=$this->form->submit('Save'); ?>
<?=$this->form->end();?>